<!DOCTYPE html>
<html>
<head>
<title>OrientDB Studio v. 1.1.0 (www.orientdb.org)</title>
<meta name="title" content="Document | DBMS | Database | Java | Studio" />
<meta name="description" content="OrientDB Studio" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link type="image/png" href="/favicon.ico" rel="icon">
<link rel="stylesheet" type="text/css" media="screen" href="styles/custom/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="styles/custom/jquery.fileupload-ui.css" />
<link rel="stylesheet" type="text/css" media="screen" href="styles/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="styles/studio.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/prettify.css">

<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="../js/jquery.tools.min.js" type="text/javascript"></script>
<script src="../js/jquery.json-2.2.min.js" type="text/javascript"></script>
<script src="../js/jquery.fileupload.js" type="text/javascript"></script>
<script src="../js/jquery.fileupload-ui.js" type="text/javascript"></script>
<script src="../js/orientdb-form.js" type="text/javascript"></script>
<script src="../js/orientdb-api.js" type="text/javascript"></script>
<script src="../js/orientdb-app.js" type="text/javascript"></script>
<script src="../js/orientdb-controller.js" type="text/javascript"></script>

<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/orientdb-studio.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/autoresize.jquery.min.js" type="text/javascript"></script>
<script src="js/codemirror/codemirror.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
<script src="js/orientdb-graph.js"></script>

<script type="text/javascript">
	var startTime = 0; // CONTAINS THE LAST EXECUTION TIME
	var databaseInfo; // CONTAINS THE DB INFO
	var classEnumeration; // CONTAINS THE DB CLASSES
	var selectedClassName; // CONTAINS LATEST SELECTED CLASS NAME
	var orientServer;
	var selectedObject;

	var controller = new OController({
		component : "panel",
		cachePages : false
	});

	function disconnect() {
		if (orientServer == null) {
			orientServer = new ODatabase;
			orientServer.setDatabaseUrl($('#server').val());
			orientServer.setDatabaseName($('#database').val());
			orientServer.close();
		} else {
			orientServer.close();
			orientServer = null;
		}
		$('#header').hide();
		$("#navigation").hide();
		$("#buttonDisconnect").hide();
		$("#buttonConnect").show();

		controller.loadFragment('panelHome.htm');
	}

	function displayDocument(selObject, database) {
		selectedObject = selObject;
		controller.loadFragment("panelDocument.htm");
	}

	function displayGraph(selObject) {
		selectedObject = selObject;
		controller.loadFragment("panelGraph.htm");
	}
</script>
</head>
<body>
	<div class="container">
		<div class="row-fluid" id="header">
			<div class="span2">
				<div class="row-fluid">
					<div class="span12">
						<a href="."><img border="0" src="images/orient_db.png" /></a>
					</div>
				</div>
			</div>
			<div class="span2">
				<div class="row-fluid">
					<div class="span12">
						<label class="control-label">Database:</label>
					</div>
					<div class="span12">
						<input id="header-server" value="" readonly type="hidden" /> <input id="header-database" value="demo" class="input-small" readonly />
					</div>
				</div>
			</div>
			<div class="span8" align="right">
				<div id="navigation-bar" class="btn-group" align="right">
					<button class="btn" onclick="javascript:controller.loadFragment('panelDatabase.htm')">
						<img src='images/menu-database.png' /><br>Database
					</button>
					<button class="btn" onclick="javascript:controller.loadFragment('panelQuery.htm')">
						<img src='images/menu-query.png' /><br>Query
					</button>
					<button class="btn" onclick="javascript:controller.loadFragment('panelDocument.htm')">
						<img src='images/menu-document.png' /><br>Document
					</button>
					<button class="btn" onclick="javascript:controller.loadFragment('panelGraph.htm')">
						<img src='images/menu-graph.png' /><br>Graph
					</button>
					<button class="btn" onclick="javascript:controller.loadFragment('panelRaw.htm')">
						<img src='images/menu-raw.png' /><br>Raw access
					</button>
					<button class="btn" onclick="javascript:controller.loadFragment('panelServer.htm')">
						<img src='images/menu-server.png' /><br>Server
					</button>
					<a class="btn" href="http://code.google.com/p/orient/wiki/OrientDB_Studio" target="help"><img src='images/help.png' /><br>Help</a>
					<button class="btn" onclick="javascript:disconnect()">
						<img src='images/disconnect.png' /><br>Disconnect
					</button>
				</div>
			</div>
		</div>
		<div class="row-fluid">
			<div id="panel" class="span12"></div>
		</div>
		<div class="row-fluid">
			<div class="span1">Output:</div>
			<div class="span11">
				<textarea style="width: 100%;" id="output" rows="3" title="value" readonly="readonly"></textarea>
			</div>
		</div>
		<div class="row-fluid">
			<div class="span12" align="center">
				To know more information visit: <a href="http://www.orientechnologies.com">http://www.orientechnologies.com</a>
			</div>
		</div>
	</div>
</body>
</html>